﻿@model IList<FCDB.Web.Models.ActivityConditionUser>
@{
    ViewBag.Title = "流程结束";
    Layout = "~/Views/Shared/_FormLayout.cshtml";
}

@section HeadIncluder 
{
 
    <script src=@Url.Content("/Scripts/jquery.form.js") type="text/javascript"></script> 
     <link href='@Url.Content("~/Content/public.css")' rel="stylesheet" />
    <link href='@Url.Content("~/Content/con_style.css")' rel="stylesheet" />
    <style type="text/css">
        body {
             height:400px;
        }
    </style>
}
    @{
                         
                         System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();  
                             FCDB.Web.Models.ActivityConditionUser modeluser = Model.First(); 
                           <select  id="cbProcessActivity"    style="display:none">
                             @foreach (var item in Model)
                             {
                                 <option value="@item.ActivityGuid"  IsAllCheckState="@item.IsAllCheckState"  UserList="@serializer.Serialize(item.EmployeeList)" >
                                     @item.ActivityName
                                 </option>
                             }
                         </select> 
                         
                     }
<div class="xz_dhk">  
    <table width="100%" class="xz_t" style="height: 200px">
        <tr>
            
                  
                     
                 
            <td style=" text-align:center;">
                 你确认要结束该流程吗？ 
            </td>
        </tr>
        <tr>
            <td  style="text-align:center;">
                 <button id="subbtn" type="button" class="ui_state_highlight fj btn_c1 btn_s" style="display:inline">确定</button>
                 <button type="button" onclick="cancel();" class="fj btn_c1 btn_s"  style="display:inline">取消</button>
                
                @*<div class="cxl">
                    <p style="text-align: center; margin-top: 10px;">
                        <button type="button" onclick="cancel();" class="fj btn_c1 btn_s">取消</button>
                        <button id="subbtn" type="button" class="ui_state_highlight fj btn_c1 btn_s">确定</button>
                    </p>
                </div>*@
            </td>
        </tr>
    </table> 
</div>
<script type="text/javascript">
    
    
    function cancel() {
        window.close();
    } 

    $(function () {
        $("#subbtn").click(function () {
            var arr = new Array();
            var strIsAllCheckState = $("#cbProcessActivity").find("option:selected").attr("IsAllCheckState");
            var obj = new Object();
            obj.UserIDList = arr;
            obj.IsComplete = true;
            obj.ActivityGuid = $("#cbProcessActivity").val();
            window.top.refresh(obj);
            window.top.oDG.close();
        }); 
    });
  
    
</script>
